package durst.data;

import java.util.Date;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

import durst.data.dao.impl.CookieToAccountDao;

@DatabaseTable(tableName = "CookieToAccount", daoClass = CookieToAccountDao.class)
public class CookieToAccount extends CSDEntity {
	public static final String ID = "id";
	public static final String EXPIRES = "expires";

	@DatabaseField(id = true, columnName = ID)
	private int id;
	
	@DatabaseField(canBeNull = false, foreign = true)
	private Account account;
	
	@DatabaseField(canBeNull = false, columnName = EXPIRES)
	private Date expires;

	public CookieToAccount() {}

	public CookieToAccount(int id, Account acc, Date expires) {
		this.id = id;
		this.account = acc;
		this.expires = expires;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public Account getAccount() {
		return account;
	}

	public void setAccount(Account account) {
		this.account = account;
	}

	public Date getExpires() {
		return expires;
	}

	public void setExpires(Date expires) {
		this.expires = expires;
	}
}
